home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Periodicals / CSMP / C.S.M.P. Digest, Issue 3.019 < prev    next >
Internet Message Format  |  1994-06-09  |  87KB

  1. From: pottier@clipper.ens.fr (Francois Pottier)
  2. Subject: csmp-digest-v3-019
  3. Date: Mon, 25 Apr 94 11:11:52 MET DST
  4.  
  5. C.S.M.P. Digest             Mon, 25 Apr 94       Volume 3 : Issue 19
  6.  
  7. Today's Topics:
  8.  
  9.         C Source Code Wanted: Beginer Examples
  10.         Decompressing JPEG images: Help!
  11.         Mac Game Programming
  12.         Mixed Mode Manager statistics gathering - is it possible?
  13.         Pure virtual call from a dtor
  14.         Symantec C++ 7.0 (Full)- Initial Impressions
  15.         Symantec technical support not home
  16.         System 7 Pro & Drag Mgr.
  17.         Using PBCatSearch
  18.  
  19.  
  20.  
  21. The Comp.Sys.Mac.Programmer Digest is moderated by Francois Pottier
  22. (pottier@clipper.ens.fr).
  23.  
  24. The digest is a collection of article threads from the internet newsgroup
  25. comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
  26. regularly and want an archive of the discussions.  If you don't know what a
  27. newsgroup is, you probably don't have access to it.  Ask your systems
  28. administrator(s) for details.  If you don't have access to news, you may
  29. still be able to post messages to the group by using a mail server like
  30. anon.penet.fi (mail help@anon.penet.fi for more information).
  31.  
  32. Each issue of the digest contains one or more sets of articles (called
  33. threads), with each set corresponding to a 'discussion' of a particular
  34. subject.  The articles are not edited; all articles included in this digest
  35. are in their original posted form (as received by our news server at
  36. nef.ens.fr).  Article threads are not added to the digest until the last
  37. article added to the thread is at least two weeks old (this is to ensure that
  38. the thread is dead before adding it to the digest).  Article threads that
  39. consist of only one message are generally not included in the digest.
  40.  
  41. The digest is officially distributed by two means, by email and ftp.
  42.  
  43. If you want to receive the digest by mail, send email to listserv@ens.fr
  44. with no subject and one of the following commands as body:
  45.     help                        Sends you a summary of commands
  46.     subscribe csmp-digest Your Name    Adds you to the mailing list
  47.     signoff csmp-digest            Removes you from the list
  48. Once you have subscribed, you will automatically receive each new
  49. issue as it is created.
  50.  
  51. The official ftp info is //ftp.dartmouth.edu/pub/csmp-digest.
  52. Questions related to the ftp site should be directed to
  53. scott.silver@dartmouth.edu. Currently no previous volumes of the CSMP
  54. digest are available there.
  55.  
  56. Also, the digests are available to WAIS users as comp.sys.mac.programmer.src.
  57.  
  58.  
  59. -------------------------------------------------------
  60.  
  61. >From Spiegs <spie0024@student.tc.umn.edu>
  62. Subject: C Source Code Wanted: Beginer Examples
  63. Date: Fri, 1 Apr 1994 08:15:19 GMT
  64. Organization: University of Minnesota, Twin Cities
  65.  
  66. I am a fairly novice C programmer. I am interested in obtaining all the C
  67. source code I can obtain, preferably simple code for now.
  68.  
  69. I am looking for any FTP sites with C source code available to anonymous
  70. users. Thanks.
  71.  
  72. BTW - I would spring for CodeWarrior in a hartbeat, if I had a CD-Rom.
  73.  
  74. Spiegs
  75. spie0024@gold.tc.umn.edu
  76.  
  77. +++++++++++++++++++++++++++
  78.  
  79. >From kenlong@netcom.com (Ken Long)
  80. Date: Fri, 1 Apr 1994 21:04:02 GMT
  81. Organization: NETCOM On-line Communication Services (408 241-9760 guest)
  82.  
  83. Find the current MacFTP list and then connect to ftps on the list which 
  84. reportedly have lots of Mac files.  Stanford and the University of 
  85. Michigan have the "largest stock" of source code.  Look in their 
  86. development and source directories and there are enough examples to 
  87. either make you crave more or give up programming.
  88.  
  89. Check the ftp that's home to the alt.sources.mac newsgroup, as well.
  90.  
  91. -Ken-
  92.  
  93. +++++++++++++++++++++++++++
  94.  
  95. >From chuck@gte.com (Chuck Hoffman)
  96. Date: Tue, 5 Apr 1994 12:43:49 GMT
  97. Organization: GTE Laboratories
  98.  
  99. In article <CnKMty.Eq2@news.cis.umn.edu>, Spiegs
  100. <spie0024@student.tc.umn.edu> wrote:
  101.  
  102. > I am a fairly novice C programmer. I am interested in obtaining all the C
  103. > source code I can obtain, preferably simple code for now.
  104. > I am looking for any FTP sites with C source code available to anonymous
  105. > users. Thanks.
  106.  
  107. 1.  There are good examples for beginners in "Macintosh C Programming
  108. Primer, Volume 1, second edition" by Mark and Reed.  The book comes with a
  109. diskette.
  110.  
  111. 2.  There are several locations for Frequently Asked Questions (FAQs). 
  112. Some of the FAQs include code snippets.  You may be interested in these:
  113.  
  114.    ftp site:  rtfm.mit.edu
  115.    directory:  /pub/usenet/news.answers/macintosh
  116.    files (in order):
  117.    1.  general
  118.    2.  system
  119.    3.  misc
  120.    4.  apps
  121.  
  122.    ftp site:  ftp.cs.uoregon.edu
  123.    directory:  /pub/mac
  124.    files (in order):
  125.    1.  csmp-faq-1
  126.    2.  csmp-faq-2
  127.  
  128.    ftp site:  nada.kth.se
  129.    directory:  /pub/hacks/mac-faq
  130.    file:  CSMP_PD_FAQ
  131.  
  132.    ftp site:  soda.berkeley.edu
  133.    directory:  /pub/jwang
  134.    file:  av-general-faq.txt
  135.  
  136.  
  137. 3.  Chassis is a sample application shell upon which you can build other
  138. applications.  Chassis is a good source of sample code.  Chassis is in the
  139. following anonymous ftp locations.  Do not use the version at Stanford
  140. University (sumex-aim) because it is not current, and is not 32-bit clean. 
  141. Use these, instead:
  142.  
  143. ftp.gte.com:
  144. /pub/chuck/Chassis_6.0.sea.hqx
  145.  
  146. mac.archive.umich.edu:
  147. /mac/development/source/chassis6.0.cpt.hqx
  148.  
  149. -- 
  150. Chuck Hoffman
  151. GTE Laboratories, Waltham, MA, USA
  152. 617-466-2131
  153. - ------------------------------------------------
  154. I'm not sure why we're here, but I am sure that
  155. while we're here we're supposed to help each other.
  156. - ------------------------------------------------
  157.  
  158. +++++++++++++++++++++++++++
  159.  
  160. >From blob@apple.com (Brian Bechtel)
  161. Date: 9 Apr 1994 06:16:48 -0700
  162. Organization: Apple Computer, Inc., Cupertino, California
  163.  
  164. Spiegs <spie0024@student.tc.umn.edu> writes:
  165.  
  166. >I am a fairly novice C programmer. I am interested in obtaining all the C
  167. >source code I can obtain, preferably simple code for now.
  168.  
  169. I have an html file (for Mosaic) on ftp.apple.com which points to
  170. several major source code sites.  ftp.apple.com is not a MacHttp server,
  171. so you have to grab the file directly.  The URL is
  172.  file://ftp.apple.com/pub/blob/macsourcecode.html
  173. I'd welcome additions or corrections.
  174.  
  175. Yes, I do plan to eventually have a HTTP server.
  176.  
  177. --Brian Bechtel     blob@apple.com     "My opinion, not Apple's"
  178.  
  179. ---------------------------
  180.  
  181. >From cr@cs.strath.ac.uk (Chris Reid)
  182. Subject: Decompressing JPEG images: Help!
  183. Date: Wed, 06 Apr 1994 11:22:36 +0000
  184. Organization: University of Strathclyde
  185.  
  186. Hi Netters,
  187.  
  188. I'm trying to decompress and display 32-bit JPEG images. I've (sort of)
  189. figured out how to do this. The problem is, the image doesn't appear
  190. on screen properly, because the palette isn't quite right. At the
  191. same time, I'd like to convert it to PICT format. I'm using QuickTime
  192. to do the 'dirty work' for me. The quality of the decompressed image
  193. should be as high as possible. The destination screen is 8 bits deep.
  194. Here's what I'm doing:
  195.  
  196.  
  197. OpenCPicParams    header;
  198. ImageDescriptionHandle    desc;
  199. PicHandle thePic;
  200.  
  201. [Set up desc and get image dimensions (header.srcRect)]
  202.  
  203. /* Create a gWorld for the decompressed data */
  204. e = NewGWorld(&theGWorld, (*desc)->depth, &header.srcRect, NULL, NULL, 0);
  205.     
  206. if (e != noErr)
  207. {
  208.     [blah, blah]
  209. }
  210.  
  211. /* Set the port and open picture */
  212.  
  213. SetGWorld(theGWorld, NULL);
  214. thePic = OpenCPicture(&header);
  215.     
  216.  
  217. /* Now do the actual decompression */
  218.  
  219. e = FDecompressImage(
  220.         data, 
  221.         desc, 
  222.         GetGWorldPixMap(theGWorld),
  223.         &header.srcRect, 
  224.         NULL, 
  225.         ditherCopy, 
  226.         (RgnHandle) NULL,
  227.         (PixMapHandle) NULL, 
  228.         (Rect *) NULL, 
  229.         codecMaxQuality, 
  230.         bestFidelityCodec, 
  231.         0,
  232.         (DataProcRecordPtr) NULL, 
  233.         (ProgressProcRecordPtr) &myProgressRec);
  234.         
  235. if (e != noErr)
  236. {
  237.     [more blah, blah]
  238. }
  239.  
  240. /* Done! */
  241.  
  242. ClosePicture();
  243.  
  244. /* Now get the (supposedly) ideal 8 bit palette */
  245. /* popularMethod or medianMethod doesn't improve things, btw. */
  246.  
  247. e = GetPixMapInfo(GetGWorldPixMap(theGWorld), &thePictInfo, returnPalette,
  248.                   256, systemMethod, 0);
  249.  
  250. [tidy up etc]
  251.  
  252. /* Display picture and set palette to match */
  253.  
  254. SetPalette(myWindow, thePictInfo.thePalette, TRUE);
  255. DrawPicture(thePic, &(*thePic)->picFrame);
  256.  
  257.  
  258. Everythings works, the picture displays fine. It's just not quite right.
  259. The palette returned doesn't seem to fit the image. GifConverter manages
  260. slightly better, JPEGView displays the image perfectly. What am I doing
  261. wrong?
  262.  
  263. I'll be forever grateful for any hints or solutions! A deadline is looming.
  264. Please e-mail me as our news server is *very* unreliable. I'll summarise
  265. to the net, probably to alt.sources.mac if I can come up with some source
  266. code.
  267.  
  268.  
  269.  
  270. Many thanks in advance,
  271.  
  272.  
  273. Chris
  274.  
  275.  
  276. PS: I can save my converted JPEG image in it's new PICT form. Again,
  277. JPEGView
  278. displays it like a charm. Aaron, how the heck do you do it :-)
  279.  
  280.  
  281. +-----------------------------------------------------------------+
  282. |Chris Reid                            e-mail: cr@cs.strath.ac.uk |
  283. |Dept. Computer Science, Strathclyde University, Glasgow, Scotland|
  284. +-----------------------------------------------------------------+
  285.  
  286. +++++++++++++++++++++++++++
  287.  
  288. >From ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  289. Date: 11 Apr 94 17:13:12 +1200
  290. Organization: University of Waikato, Hamilton, New Zealand
  291.  
  292. In article <cr-060494112236@mac-13.cs.strath.ac.uk>, cr@cs.strath.ac.uk (Chris Reid) writes:
  293. >
  294. > I'm trying to decompress and display 32-bit JPEG images. I've (sort of)
  295. > figured out how to do this. The problem is, the image doesn't appear
  296. > on screen properly, because the palette isn't quite right.
  297. >
  298. > /* Now get the (supposedly) ideal 8 bit palette */
  299. > /* popularMethod or medianMethod doesn't improve things, btw. */
  300. >
  301. > e = GetPixMapInfo(GetGWorldPixMap(theGWorld), &thePictInfo, returnPalette,
  302. >                   256, systemMethod, 0);
  303.  
  304. The basic problem is that the Picture Utilities package doesn't understand
  305. anything about QuickTime-compressed PixMaps.
  306.  
  307. It's a pity. They did a good job of integrating QuickTime into all the rest
  308. of QuickDraw, but they never got around to fixing this.
  309.  
  310. You could always decompress to a regular PixMap, do a GetPixMapInfo on this,
  311. then go back and use that palette with the original compressed data.
  312.  
  313. Lawrence D'Oliveiro                       fone: +64-7-856-2889
  314. Info & Tech Services Division              fax: +64-7-838-4066
  315. University of Waikato            electric mail: ldo@waikato.ac.nz
  316. Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+12:00
  317.  
  318. ---------------------------
  319.  
  320. >From Shinya Fujimoto <fujimoto+@CMU.EDU>
  321. Subject: Mac Game Programming
  322. Date: Thu,  7 Apr 1994 13:33:28 -0400
  323. Organization: Junior, Electrical and Computer Engineering, Carnegie Mellon, Pittsburgh, PA
  324.  
  325. Hi, 
  326.  
  327. I am not sure if this is the right place to post,
  328. but if I'm wrong, please redirect me.
  329.  
  330. I am a beginner in Macintosh program and am now in
  331. the step of programming a simple game.
  332.  
  333. I wonder if there is any good way to move objects around 
  334. the screen. I currently use scroll, but this becomes
  335. extremely slow if the region is a little too big.
  336. Redrawing the object will flash the object as it erases
  337. and redraws.  
  338.  
  339. Is there any good way??
  340.  
  341. Thanks!
  342.  
  343.     Takoyaki Master
  344.  
  345. - ---------------------------------
  346. Shinya Fujimoto
  347. Carnegie Mellon University
  348.  Carnegie Institue of Technology
  349.  Electrical & Computer Engineering
  350.  
  351. E-mail: sf1x+@andrew.cmu.edu
  352.         fujimoto+@cmu.edu
  353. - ---------------------------------
  354.  
  355. +++++++++++++++++++++++++++
  356.  
  357. >From alex@metcalf.demon.co.uk (Alex Metcalf)
  358. Date: Fri, 8 Apr 1994 10:38:53 GMT
  359. Organization: Demon Internet
  360.  
  361. In article <Mhd4DcG00Vpg0xEWYf@andrew.cmu.edu>, Shinya Fujimoto
  362. <fujimoto+@CMU.EDU> wrote:
  363.  
  364. > Hi, 
  365. > I am not sure if this is the right place to post,
  366. > but if I'm wrong, please redirect me.
  367. > I am a beginner in Macintosh program and am now in
  368. > the step of programming a simple game.
  369. > I wonder if there is any good way to move objects around 
  370. > the screen. I currently use scroll, but this becomes
  371. > extremely slow if the region is a little too big.
  372. > Redrawing the object will flash the object as it erases
  373. > and redraws.  
  374. > Is there any good way??
  375. > Thanks!
  376. >     Takoyaki Master
  377.  
  378.      Don't worry, you're in the right place!
  379.  
  380.      The best way is to keep copying the graphic in the new position.
  381. However, to avoid the flicker, you need to create an "offscreen graphics
  382. world", as described in Inside Mac 6. Just think of it as a screen you
  383. can't see. You draw all the graphics to this world, and then copy them all
  384. onto the screen (in the new positions) using CopyBits, described in Inside
  385. Mac 1 and 5.
  386.  
  387.      Let me know if I can be of more help!
  388.  
  389.      Alex
  390.  
  391. --
  392. Alex Metcalf, Mac programmer in C, C++, HyperTalk, assembler
  393.  
  394. Internet, AOL, BIX: alex@metcalf.demon.co.uk            "Surely you
  395. AppleLink:          alex@metcalf.demon.co.uk@internet#   can't be
  396. CompuServe:         INTERNET:alex@metcalf.demon.co.uk    serious?"
  397. Delphi:             alex@metcalf.demon.co.uk@inet#
  398. FirstClass:         alex@metcalf.demon.co.uk,Internet   "I'm serious...
  399. Fax (UK):           (0570) 45636                         and don't call
  400. Fax (US / Canada):  011 44 570 45636                     me Shirley."
  401.  
  402. +++++++++++++++++++++++++++
  403.  
  404. >From declipse@aol.com (DEclipse)
  405. Date: 7 Apr 1994 17:02:02 -0400
  406. Organization: America Online, Inc. (1-800-827-6364)
  407.  
  408. In article <Mhd4DcG00Vpg0xEWYf@andrew.cmu.edu>, Shinya Fujimoto
  409. <fujimoto+@CMU.EDU> writes:
  410. >I wonder if there is any good way to move objects around 
  411. >the screen. I currently use scroll, but this becomes
  412. >extremely slow if the region is a little too big.
  413. >Redrawing the object will flash the object as it erases
  414. >and redraws.  
  415.  
  416. Well, I don't normally answer posts like this, but since it's for a CMU person
  417. (I grad in '90), here's a start. It works for B & W, but you can change it to
  418. color. Determine the size of the object you want to scroll, add twice the
  419. maximum scroll amount for both horiz. and vert. So:
  420. short H = ObjectH + 2 * DeltaH;
  421. short V = ObjectV + 2 * DeltaV;
  422. Translate H to bits and round to the nearest word:
  423. short RowBytes = ((H +7) / 8 + 1) & 0xFFFE;
  424. in non-optimized code. So you need a block of memory sized V * RowBytes.
  425. Allocate this block and create a BitMap record. Set the fields in the BitMap
  426. and set the base addr to the block of memory you allocated. Create a GrafPort.
  427. SetPortBits to the BitMap. Get the oldPort, SetPort to the GrafPort, Draw your
  428. object in the center of the BitMap, close the port, SetPort to the oldPort. Now
  429. you can use CopyBits from the BitMap you created to qd.screenBits with the
  430. appropriate rects and regions.
  431.  
  432. This is a lot of work, but the fastest compatible method. Keep your mask
  433. regions nil or rects for speed. The white space around the objects is so that
  434. you can erase the old image and copy the new image without having to call
  435. EraseRect. (Calling EraseRect and then CopyBits isn't bad, but there may be
  436. some minor flicker if the Rects overlap.)
  437.  
  438. Howard Fukuda
  439.  
  440. +++++++++++++++++++++++++++
  441.  
  442. >From Reid Ellis <rae@alias.com>
  443. Date: Sun, 10 Apr 1994 01:51:37 GMT
  444. Organization: Alias Research, Inc., Toronto ON Canada
  445.  
  446. Shinya Fujimoto <fujimoto+@CMU.EDU> wrote:
  447. |> I wonder if there is any good way to move objects around 
  448. |> the screen. I currently use scroll, but this becomes
  449. |> extremely slow if the region is a little too big.
  450. |> Redrawing the object will flash the object as it erases
  451. |> and redraws.  
  452.  
  453. Alex Metcalf <alex@metcalf.demon.co.uk> writes:
  454. |     The best way is to keep copying the graphic in the new position.
  455. |However, to avoid the flicker, you need to create an "offscreen graphics
  456. |world", as described in Inside Mac 6.
  457.  
  458. [..more good advice deleted]
  459.  
  460. An alternative is to use the SpriteWorld library, available at an FTP
  461. site near you.  It handles very fast blitting of sprites around the
  462. screen, using offscreen GWorlds and CopyBits() and even non-CopyBits()
  463. [very *compatible* direct-to-screen memory access].
  464.  
  465. I haven't used it myself; these opinions have been formed by reading
  466. feedback in this group over time.
  467.  
  468. Reid
  469. --
  470. - -
  471. Reid Ellis, Alias Research Inc.
  472. +1 416 362 9181 <rae@Alias.com>
  473.  
  474. +++++++++++++++++++++++++++
  475.  
  476. >From alex@metcalf.demon.co.uk (Alex Metcalf)
  477. Date: Sun, 10 Apr 1994 10:34:32 GMT
  478. Organization: Demon Internet
  479.  
  480. In article <1994Apr10.015137.5181@alias.com>, Reid Ellis <rae@alias.com>
  481. wrote:
  482.  
  483. > Shinya Fujimoto <fujimoto+@CMU.EDU> wrote:
  484. > |> I wonder if there is any good way to move objects around 
  485. > |> the screen. I currently use scroll, but this becomes
  486. > |> extremely slow if the region is a little too big.
  487. > |> Redrawing the object will flash the object as it erases
  488. > |> and redraws.  
  489. > Alex Metcalf <alex@metcalf.demon.co.uk> writes:
  490. > |     The best way is to keep copying the graphic in the new position.
  491. > |However, to avoid the flicker, you need to create an "offscreen graphics
  492. > |world", as described in Inside Mac 6.
  493. > [..more good advice deleted]
  494. > An alternative is to use the SpriteWorld library, available at an FTP
  495. > site near you.  It handles very fast blitting of sprites around the
  496. > screen, using offscreen GWorlds and CopyBits() and even non-CopyBits()
  497. > [very *compatible* direct-to-screen memory access].
  498. > I haven't used it myself; these opinions have been formed by reading
  499. > feedback in this group over time.
  500. > Reid
  501.  
  502.         The non-CopyBits direct screen memory access stuff isn't that hard....
  503. the best place to start is to read the "Graphics" folder of the Mac Game
  504. Developer's Handbook on the Developer CDs. It has loads of excellent
  505. technotes relating directly to game development, such as non-CopyBits and
  506. dithering graphics for mono screens.
  507.  
  508.      I could also post some code I've written in assembler: it copies a
  509. rectangle from an offscreen world to either another offscreen world or to
  510. the screen. It works quite well, and beats the hell out of CopyBits.
  511.  
  512.      Alex
  513.  
  514. --
  515. Alex Metcalf, Mac programmer in C, C++, HyperTalk, assembler
  516.  
  517. Internet, AOL, BIX: alex@metcalf.demon.co.uk            "Surely you
  518. AppleLink:          alex@metcalf.demon.co.uk@internet#   can't be
  519. CompuServe:         INTERNET:alex@metcalf.demon.co.uk    serious?"
  520. Delphi:             alex@metcalf.demon.co.uk@inet#
  521. FirstClass:         alex@metcalf.demon.co.uk,Internet   "I am serious...
  522. Fax (UK):           (0570) 45636                         and don't call
  523. Fax (US / Canada):  011 44 570 45636                     me Shirley."
  524.  
  525. ---------------------------
  526.  
  527. >From sbarta@magnus.acs.ohio-state.edu (Scott Barta)
  528. Subject: Mixed Mode Manager statistics gathering - is it possible?
  529. Date: 6 Apr 1994 09:58:08 -0400
  530. Organization: The Ohio State University
  531.  
  532. I have been thinking for a while that a really neat app/init/cdev to write
  533. for the PowerMacs would be one that sits on top of the Mixed Mode Manager
  534. and gathers statistics for the number of mode switches that occur, the
  535. amount of time the system spends emulated, the time spent native, the
  536. overhead for a mode switch, etc.  The utility could collect stats for the
  537. system as a whole and possibly by application.
  538.  
  539. Obviously it would greatly increase the overhead for a mode switch, so it
  540. isn't something one would want running constantly, but it would be very
  541. interesting and informative for those who are curious about what's going on
  542. under the covers.
  543.  
  544. The question is, how could you do it?  I looked at the interface for the
  545. MMM last night, and understandably, there isn't any sort of interface that
  546. would allow you to patch in and install your own routines into a mode
  547. switch.  (I think I can hear the Apple guys groaning somewhere in the
  548. distance).  I tried tracing into some native traps with MacsBug, but,
  549. little to my surprise, a 680X0 debugger didn't give me much help with
  550. native code.
  551.  
  552. But I figure there must be a way, since it sounds like exactly the sort of
  553. thing the Apple engineers would use while developing OS code on the
  554. machine.  Anyone out there care to drop a hint or two (or perhaps bestow a
  555. gift of the utility if it indeed exists)?
  556.  
  557. /************************************************************************/
  558. /* Scott Barta                                                          */
  559. /* Eisenhower National Clearinghouse                                    */
  560. /* The Ohio State University                                            */
  561. /* sbarta@enc.org                                                       */
  562. /************************************************************************/
  563.  
  564.  
  565.  
  566. +++++++++++++++++++++++++++
  567.  
  568. >From jlscott@tigr.org (John L. Scott)
  569. Date: 6 Apr 1994 14:17:43 -0500
  570. Organization: Self
  571.  
  572. In article <199404061358.JAA13146@bottom.magnus.acs.ohio-state.edu>,
  573. sbarta@magnus.acs.ohio-state.edu (Scott Barta) wrote:
  574.  
  575. > Obviously it would greatly increase the overhead for a mode switch, so it
  576. > isn't something one would want running constantly, but it would be very
  577. > interesting and informative for those who are curious about what's going on
  578. > under the covers.
  579.  
  580. Actually, the patch itself would only need to increment a couple of longs
  581. each time a mode switch occurs.  That's not a great increase in overhead.
  582.  
  583. The application that monitors those longs could be set to update them every
  584. second or so.  No great overhead there.
  585.  
  586. Sounds doable to me--if you can figure out what to hook into.
  587.  
  588. --John L. Scott
  589.  
  590. +++++++++++++++++++++++++++
  591.  
  592. >From Brian Strull <strull@apple.com>
  593. Date: Mon, 11 Apr 1994 22:43:27 GMT
  594. Organization: Apple Computer, Inc.
  595.  
  596. The Macintosh Debugger for PowerPC, available with the Macintosh on RISC
  597. SDK,
  598. includes some features for performance gathering.
  599.  
  600. It uses pc sampling to give an estimate of % emulated time vs. % native
  601. time,
  602. and breaks native time up into which libraries you were in, and which
  603. functions within libraries.  Since parts of the system are libraries, this
  604. gives you some of the information you want.
  605.  
  606. This doesn't do everything you asked.  It doesn't count mixed mode
  607. switches,
  608. or measure absolute time spent on mixed mode overhead.
  609.  
  610. +++++++++++++++++++++++++++
  611.  
  612. >From tim@toad.com (Tim Maroney)
  613. Date: 11 Apr 94 20:52:51 GMT
  614. Organization: As Little As Possible
  615.  
  616. In article <199404061358.JAA13146@bottom.magnus.acs.ohio-state.edu>
  617. sbarta@magnus.acs.ohio-state.edu (Scott Barta) writes:
  618. >I have been thinking for a while that a really neat app/init/cdev to write
  619. >for the PowerMacs would be one that sits on top of the Mixed Mode Manager
  620. >and gathers statistics for the number of mode switches that occur, the
  621. >amount of time the system spends emulated, the time spent native, the
  622. >overhead for a mode switch, etc.
  623. >
  624. >The question is, how could you do it?
  625.  
  626. Great idea!  Let's see, is it possible?  Here's a first stab at a design,
  627. for which I make absolutely no promises:
  628.  
  629. (1) Use the millisecond timer for collecting statistics on time spent
  630.     in each mode.  Your timer routine should merely increment a counter
  631.     which will be used by the intercepts below.
  632.  
  633. (2) Detect mode switches from 68K->PPC by intercepting the mixed mode
  634.     pseudo-trap in the 68K emulator.  A little challenging but you should
  635.     be able to use a debugger to find out where the code you need to patch
  636.     lives: just step through an execution of an instance of _MixedModeMagic.
  637.  
  638. (2a) Catching the return to 68K mode is tricky.  You'll need to either
  639.     munge the switch stack frame to return to a routine that does
  640.     the statistics gathering (see IM: PPC System Software, p. 2-11)
  641.     or figure out what the Mixed Mode Manager does when it sees that bit
  642.     and intercept the action another way.  The former is probably easier.
  643.     Your intercept for _MixedModeMagic can push a return address to a 68K
  644.     routine that will notice the mode switch back to 68K and then return
  645.     to the caller of _MixedModeMagic.
  646.  
  647. (3) Detect mode switches from PPC-68K by the method in (2a) as well as by
  648.     patching CallUniversalProc and CallOSTrapUniversalProc.  Again you
  649.     will probably need to push a return-interception code address onto
  650.     the stack.
  651.  
  652. (4) A drop-dead-easy Control Panel interface to turn the thing on and off
  653.     and report the statistics, with an INIT to install these patches.
  654.  
  655. I'd give it about a week, maybe two weeks if the interception of
  656. _MixedModeMagic turns out to be especially tricky.  But I haven't
  657. looked into this in a real way at all, and this design might not work
  658. for that reason.
  659. -- 
  660. Tim Maroney, Communications and User Interface Engineer
  661. {apple!sun}!hoptoad!tim, tim@toad.com
  662.  
  663. "God must be a Boogie Man." -- Joni Mitchell
  664.  
  665. ---------------------------
  666.  
  667. >From rmah@panix.com (Robert S. Mah)
  668. Subject: Pure virtual call from a dtor
  669. Date: Sun, 03 Apr 1994 07:12:50 -0500
  670. Organization: One Step Beyond
  671.  
  672. I have the following code...
  673.  
  674.   class Test{
  675.     public:
  676.       Test() { }
  677.       virtual ~Test();
  678.       virtual int Pure() = 0;
  679.       virtual int Foo();
  680.   };
  681.  
  682.   Test::~Test() { Pure(); }
  683.  
  684.   int Test::Foo() { return Pure(); }
  685.  
  686.  
  687. In Symantec C++ (Mac v7.0) it returns the error...
  688.  
  689.   'Test::Pure' is a pure virtual function
  690.  
  691. in the d'tor.  If I use an empty d'tor, it compiles fine like it should.
  692.  
  693. However, Metrowerks C++ compiles the Pure() call in the d'tor without
  694. complaining.
  695.  
  696. Which is right?  Is this legal C++ code?  I can't imagine why I can't call
  697. a pure virtual function from a dtor, but C++ is a strange language...
  698.  
  699. Cheers,
  700. Rob
  701. ________________________________________________________________________
  702.  Robert S. Mah              One Step Beyond              rmah@panix.com
  703.  
  704. +++++++++++++++++++++++++++
  705.  
  706. >From pjl@graceland.att.com (Paul J. Lucas)
  707. Date: Sun, 3 Apr 1994 19:55:48 GMT
  708. Organization: AT&T
  709.  
  710. In <rmah-030494071250@rmah.dialup.access.net> rmah@panix.com (Robert S. Mah) writes:
  711.  
  712. >I have the following code...
  713.  
  714. >  class Test{
  715. >    public:
  716. >      Test() { }
  717. >      virtual ~Test();
  718. >      virtual int Pure() = 0;
  719. >      virtual int Foo();
  720. >  };
  721.  
  722. >  Test::~Test() { Pure(); }
  723.  
  724. >  int Test::Foo() { return Pure(); }
  725.  
  726.  
  727. >In Symantec C++ (Mac v7.0) it returns the error...
  728.  
  729. >  'Test::Pure' is a pure virtual function
  730.  
  731. >in the d'tor.  If I use an empty d'tor, it compiles fine like it should.
  732.  
  733. >However, Metrowerks C++ compiles the Pure() call in the d'tor without
  734. >complaining.
  735.  
  736. >Which is right?  Is this legal C++ code?  I can't imagine why I can't call
  737. >a pure virtual function from a dtor, but C++ is a strange language...
  738.  
  739.     The code is legal.  I can find nothing forbidding it in the ARM;
  740.     *con*structors are another matter.
  741. --
  742.     - Paul J. Lucas
  743.       AT&T Bell Laboratories
  744.       Naperville, IL
  745.  
  746. +++++++++++++++++++++++++++
  747.  
  748. >From neeri@iis.ee.ethz.ch (Matthias Neeracher)
  749. Date: 3 Apr 94 23:51:00
  750. Organization: Integrated Systems Laboratory, ETH, Zurich
  751.  
  752. In article <pjl.765402948@graceland.att.com>, pjl@graceland.att.com (Paul J. Lucas) writes:
  753. > In <rmah-030494071250@rmah.dialup.access.net> rmah@panix.com (Robert S. Mah) writes:
  754.  
  755. >>I have the following code...
  756.  
  757. >>  class Test{
  758. >>    public:
  759. >>      Test() { }
  760. >>      virtual ~Test();
  761. >>      virtual int Pure() = 0;
  762. >>      virtual int Foo();
  763. >>  };
  764.  
  765. >>  Test::~Test() { Pure(); }
  766.  
  767. >>  int Test::Foo() { return Pure(); }
  768.  
  769.  
  770. >>In Symantec C++ (Mac v7.0) it returns the error...
  771.  
  772. >>  'Test::Pure' is a pure virtual function
  773.  
  774. >>in the d'tor.  If I use an empty d'tor, it compiles fine like it should.
  775.  
  776. >>However, Metrowerks C++ compiles the Pure() call in the d'tor without
  777. >>complaining.
  778.  
  779. >>Which is right?  Is this legal C++ code?  I can't imagine why I can't call
  780. >>a pure virtual function from a dtor, but C++ is a strange language...
  781.  
  782. >     The code is legal.  I can find nothing forbidding it in the ARM;
  783. >     *con*structors are another matter.
  784.  
  785. I think we have different readings of ARM 12.7, pg. 294, then:
  786. # Member functions may be called in constructors and destructors. This implies
  787. # that virtual functions may be called (directly or indirectly). The function
  788. # called will be the one defined in the constructor's (or destructor's) own
  789. # class or its bases, but *not* any function overriding it in a derived class.
  790. # This ensures that unconstructed objects will not be accessed during
  791. # construction or destruction.
  792.  
  793. While the sentence on page 295 talking about pure virtuals only talks about
  794. constructors, it seems clear to me that it applies equally to destructors,
  795. and thus Symantec C++ is IMHO right (as a syntax checker, SC++ definitely
  796. has its merits :-).
  797.  
  798. This behavior makes perfect sense: Once a virtual destructor is called, any
  799. of the "derived objects" have already been destructed and thus their "class
  800. invariants" no longer hold, which makes calling members defined there very
  801. dangerous.
  802.  
  803. Matthias
  804.  
  805. - ---
  806. Matthias Neeracher                                      neeri@iis.ethz.ch
  807.    "Evidently the cleaning lady found him slumped over his Macintosh"
  808.                                -- Jay McInerney, _Brightness Falls_
  809.  
  810.  
  811. +++++++++++++++++++++++++++
  812.  
  813. >From pjl@graceland.att.com (Paul J. Lucas)
  814. Date: Sun, 3 Apr 1994 22:42:41 GMT
  815. Organization: AT&T
  816.  
  817. In <NEERI.94Apr3235100@yggdrasil.ethz.ch> neeri@iis.ee.ethz.ch (Matthias Neeracher) writes:
  818.  
  819. >In article <pjl.765402948@graceland.att.com>, pjl@graceland.att.com (Paul J. Lucas) writes:
  820. >> In <rmah-030494071250@rmah.dialup.access.net> rmah@panix.com (Robert S. Mah) writes:
  821.  
  822. >>>I have the following code...
  823.  
  824. >>>  class Test{
  825. >>>    public:
  826. >>>      Test() { }
  827. >>>      virtual ~Test();
  828. >>>      virtual int Pure() = 0;
  829. >>>      virtual int Foo();
  830. >>>  };
  831.  
  832. >>>  Test::~Test() { Pure(); }
  833.  
  834. >>>  int Test::Foo() { return Pure(); }
  835.  
  836.  
  837. >>>In Symantec C++ (Mac v7.0) it returns the error...
  838.  
  839. >>>  'Test::Pure' is a pure virtual function
  840.  
  841. >>>in the d'tor.  If I use an empty d'tor, it compiles fine like it should.
  842.  
  843. >>>However, Metrowerks C++ compiles the Pure() call in the d'tor without
  844. >>>complaining.
  845.  
  846. >>>Which is right?  Is this legal C++ code?  I can't imagine why I can't call
  847. >>>a pure virtual function from a dtor, but C++ is a strange language...
  848.  
  849. >>     The code is legal.  I can find nothing forbidding it in the ARM;
  850. >>     *con*structors are another matter.
  851.  
  852. >I think we have different readings of ARM 12.7, pg. 294, then:
  853. ># Member functions may be called in constructors and destructors. This implies
  854. ># that virtual functions may be called (directly or indirectly). The function
  855. ># called will be the one defined in the constructor's (or destructor's) own
  856. ># class or its bases, but *not* any function overriding it in a derived class.
  857. ># This ensures that unconstructed objects will not be accessed during
  858. ># construction or destruction.
  859.  
  860. >While the sentence on page 295 talking about pure virtuals only talks about
  861. >constructors,
  862.  
  863.     Bingo!
  864.  
  865. >it seems clear to me that it applies equally to destructors,
  866.  
  867.     There is no room for supposition.  It either says it or it doesn't.
  868.     Given that it is not expressly forbidden, it is allowed.
  869.  
  870. >This behavior makes perfect sense: Once a virtual destructor is called, any
  871. >of the "derived objects" have already been destructed and thus their "class
  872. >invariants" no longer hold, which makes calling members defined there very
  873. >dangerous.
  874.  
  875.     While the poster's code has a virtual destructor, that's not the
  876.     issue; the issue is whether a pure virtual *function* can be
  877.     called from a destructor.  Since objects are destroyed bottom
  878.     up, the most-derived function *can* be called it seems.
  879.     Obviously, this is not true for CONstruction since the most
  880.     derived part hasn't been constructed yet.
  881.  
  882.     So perhaps the "omission" in the ARM is intentional.
  883. --
  884.     - Paul J. Lucas
  885.       AT&T Bell Laboratories
  886.       Naperville, IL
  887.  
  888. +++++++++++++++++++++++++++
  889.  
  890. >From b91926@fsgt01.fnal.gov (David Sachs)
  891. Date: 3 Apr 1994 17:52:56 -0500
  892. Organization: FERMILAB, Batavia, IL
  893.  
  894. It is perfectly legal (from the compiler's point of view) to call
  895. a function, that has been declared as pure virtual, either by
  896. calling the function directly or indirectly from a constructor
  897. or destructor, or by calling the function with an explicit scope
  898. qualifier.
  899.  
  900. The C++ language permits explicitly defining a function that has
  901. been declared as pure virtual, specifically for the purpose of
  902. supporting such calls.
  903.  
  904. If a pure virtual function, which has NOT been defined, is called,
  905. the effects at run time are unspecified. Two common methods used
  906. by various C++ implementations are:
  907.  
  908.   Execute random garbage or generate an immidiate failure by
  909.   jumping to location 0.
  910.  
  911.   Execute a function that prints a message about the improper
  912.   call and ends the program.
  913.  
  914. +++++++++++++++++++++++++++
  915.  
  916. >From bobzim@interaccess.com (Bob Zimmerman)
  917. Date: 3 Apr 1994 15:46:20 GMT
  918. Organization: InterAccess, Chicagoland's Full Service Internet Provider
  919.  
  920. Robert S. Mah (rmah@panix.com) wrote:
  921. > I have the following code...
  922.  
  923. >   class Test{
  924. >     public:
  925. >       Test() { }
  926. >       virtual ~Test();
  927. >       virtual int Pure() = 0;
  928. >       virtual int Foo();
  929. >   };
  930.  
  931. >   Test::~Test() { Pure(); }
  932. > In Symantec C++ (Mac v7.0) it returns the error...
  933. >   'Test::Pure' is a pure virtual function
  934. > in the d'tor.  If I use an empty d'tor, it compiles fine like it should.
  935. > Which is right?  Is this legal C++ code?  I can't imagine why I can't call
  936. > a pure virtual function from a dtor, but C++ is a strange language...
  937.  
  938. One reason the compiler could be complaining is: A Destructor will call 
  939. all of the "sub-classes" destructors... and the compiler is concerned 
  940. that these destructors... will have "thrown away" information needed by 
  941. the pure virtual funciton... This (IMHO) isn't valid for the compiler to 
  942. enforce in a d'tor since the order of execution is that the current d'tor 
  943. runs first (destroying local stack stuff - as opposed to a sub-classs) so 
  944. the sub-class stuff should always be available.
  945.  
  946. I know in the constructor - this is definilty true... I am not sure why 
  947. it would be enforced for the d'tor...
  948.  
  949. --
  950. - -------------------------------------------------
  951. | Bob Zimmerman   bobzim@interaccess.com          |
  952. |        Voice:   (708) 402-4664                  |
  953. |                                                 |
  954. | If it's worth reading,                          |
  955. |             you found it on Internet!           |
  956. - -------------------------------------------------
  957.  
  958. +++++++++++++++++++++++++++
  959.  
  960. >From rmartin@rcmcon.com (Robert Martin)
  961. Date: Mon, 4 Apr 1994 15:28:47 GMT
  962. Organization: R. C. M. Consulting Inc. 708-918-1004
  963.  
  964. rmah@panix.com (Robert S. Mah) writes:
  965. >  class Test{
  966. >    public:
  967. >      virtual ~Test();
  968. >      virtual int Pure() = 0;
  969. >  };
  970.  
  971. >  Test::~Test() { Pure(); }
  972.  
  973. >Is this legal C++ code?
  974.  
  975. No.  It is illegal to call a pure virtual function from either a
  976. constructor or destructor.  The reason is simple.  When constructing a
  977. derived class, the base class constructor is called first.  While it
  978. is executing the object under construction is an instance of the
  979. "base" NOT an instance of the derived (in fact the vtbl pointer is set
  980. at the vtbl for the base class).  Thus there IS NO IMPLEMENTATION for
  981. the pure function.  
  982.  
  983. C++ has a rule.  No member function will ever be called unless all the
  984. bases and members for that class have been constructed first.  If a
  985. constructor could call and deploy a virtual function to a class lower
  986. in the hierarchy than the currently executing constructor, then this
  987. rule would be violated.
  988.  
  989. Moral:  Don't call pure virtual functions from constructors or
  990. destructors.  Period.
  991.  
  992. -- 
  993. Robert Martin       | Design Consulting   | Training courses offered:
  994. Object Mentor Assoc.| rmartin@rcmcon.com  |   Object Oriented Analysis
  995. 2080 Cranbrook Rd.  | Tel: (708) 918-1004 |   Object Oriented Design
  996. Green Oaks IL 60048 | Fax: (708) 918-1023 |   C++
  997.  
  998. +++++++++++++++++++++++++++
  999.  
  1000. >From neeri@iis.ee.ethz.ch (Matthias Neeracher)
  1001. Date: 5 Apr 94 16:49:40
  1002. Organization: Integrated Systems Laboratory, ETH, Zurich
  1003.  
  1004. In article <pjl.765412961@graceland.att.com>, pjl@graceland.att.com (Paul J. Lucas) writes:
  1005.  
  1006. > In <NEERI.94Apr3235100@yggdrasil.ethz.ch> neeri@iis.ee.ethz.ch (Matthias Neeracher) writes:
  1007.  
  1008. >>In article <pjl.765402948@graceland.att.com>, pjl@graceland.att.com (Paul J. Lucas) writes:
  1009. >>> In <rmah-030494071250@rmah.dialup.access.net> rmah@panix.com (Robert S. Mah) writes:
  1010.  
  1011. >>>>Which is right?  Is this legal C++ code?  I can't imagine why I can't call
  1012. >>>>a pure virtual function from a dtor, but C++ is a strange language...
  1013.  
  1014. >>>     The code is legal.  I can find nothing forbidding it in the ARM;
  1015. >>>     *con*structors are another matter.
  1016.  
  1017. >>I think we have different readings of ARM 12.7, pg. 294, then:
  1018. >># Member functions may be called in constructors and destructors. This implies
  1019. >># that virtual functions may be called (directly or indirectly). The function
  1020. >># called will be the one defined in the constructor's (or destructor's) own
  1021. >># class or its bases, but *not* any function overriding it in a derived class.
  1022. >># This ensures that unconstructed objects will not be accessed during
  1023. >># construction or destruction.
  1024. [...]
  1025. >>This behavior makes perfect sense: Once a virtual destructor is called, any
  1026. >>of the "derived objects" have already been destructed and thus their "class
  1027. >>invariants" no longer hold, which makes calling members defined there very
  1028. >>dangerous.
  1029.  
  1030. >     While the poster's code has a virtual destructor, that's not the
  1031. >     issue; the issue is whether a pure virtual *function* can be
  1032. >     called from a destructor.  Since objects are destroyed bottom
  1033. >     up, the most-derived function *can* be called it seems.
  1034.  
  1035. I'm not sure what you mean by "bottom up". The destructor calling order is
  1036. exactly the opposite of the constructor calling order, so at the time the
  1037. virtual destructor is called, the most-derived function definitely *cannot* be
  1038. called. Look again at the ARM quote above:
  1039.  
  1040. # The function called will be the one defined in the constructor's (or
  1041. # destructor's) own class [...] but *not* any function overriding it [...]
  1042.  
  1043. >     Obviously, this is not true for CONstruction since the most
  1044. >     derived part hasn't been constructed yet.
  1045.  
  1046. And because at DEstruction time, the derived part is not constructed *anymore*,
  1047. the same argument applies there.
  1048.  
  1049. >     So perhaps the "omission" in the ARM is intentional.
  1050.  
  1051. Since we are arguing about the ARM rather than the Old Testament here, I am
  1052. more inclined to consider this an unintentional imprecision. No matter what is
  1053. and is not mentioned on page 295, the language quoted above from page 294 makes
  1054. it clear that a call from the destructor could only call the pure virtual,
  1055. and that is undefined even if page 295 doesn't explicitly say so.
  1056.  
  1057. Matthias
  1058.  
  1059. - ---
  1060. Matthias Neeracher                                      neeri@iis.ee.ethz.ch
  1061.   "Johannes Scotus Eriugena, the greatest European philosopher of the 9th
  1062.    century, said that if reason and authority conflict, reason should be
  1063.    given preference. And if that doesn't sound reasonable to you, you'll
  1064.    just have to accept it..."
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070.  
  1071.  
  1072. +++++++++++++++++++++++++++
  1073.  
  1074. >From rmartin@rcmcon.com (Robert Martin)
  1075. Date: Tue, 5 Apr 1994 14:00:07 GMT
  1076. Organization: R. C. M. Consulting Inc. 708-918-1004
  1077.  
  1078. pjl@graceland.att.com (Paul J. Lucas) writes:
  1079.  
  1080. [regarding the calling of pure virtual functions from destructors...]
  1081. >    There is no room for supposition.  It either says it or it doesn't.
  1082. >    Given that it is not expressly forbidden, it is allowed.
  1083.  
  1084. Bah.  This is a fine example of legalism clouding rational thought.  
  1085.  
  1086. >    [...]the issue is whether a pure virtual *function* can be
  1087. >    called from a destructor.  Since objects are destroyed bottom
  1088. >    up, the most-derived function *can* be called it seems.
  1089. >    Obviously, this is not true for CONstruction since the most
  1090. >    derived part hasn't been constructed yet.
  1091.  
  1092. >    So perhaps the "omission" in the ARM is intentional.
  1093.  
  1094. No.  The "most-derived" function is unimplemented when a PVF is called
  1095. from its own destructor.  The concrete object being destroyed has
  1096. already be partially destructed.  The class that provided the
  1097. implementation for the PVF no longer exists.  
  1098.  
  1099. While it is true that the ARM does not explicitly disallow calling
  1100. PVFs from destructors, I think it is clear that this is an omission,
  1101. and not intended to imply that calling PVFs from destructors is either
  1102. legal or advisable. 
  1103.  
  1104. There is a "hint" in the ARM regarding this.  Section 12.1, in the
  1105. commentary, "...virtual functions will work only after construction
  1106. and before destruction of an object..."  
  1107.  
  1108. The bottom line, in any case, is that if you call a PVF from a
  1109. destructor, your program will crash.  That, I think, is the most
  1110. powerful indictment of all.
  1111.  
  1112. -- 
  1113. Robert Martin       | Design Consulting   | Training courses offered:
  1114. Object Mentor Assoc.| rmartin@rcmcon.com  |   Object Oriented Analysis
  1115. 2080 Cranbrook Rd.  | Tel: (708) 918-1004 |   Object Oriented Design
  1116. Green Oaks IL 60048 | Fax: (708) 918-1023 |   C++
  1117.  
  1118. +++++++++++++++++++++++++++
  1119.  
  1120. >From kanze@us-es.sel.de (James Kanze)
  1121. Date: 05 Apr 1994 19:30:55 GMT
  1122. Organization: SEL
  1123.  
  1124. In article <pjl.765412961@graceland.att.com> pjl@graceland.att.com
  1125. (Paul J. Lucas) writes:
  1126.  
  1127. |> In <NEERI.94Apr3235100@yggdrasil.ethz.ch> neeri@iis.ee.ethz.ch (Matthias Neeracher) writes:
  1128.  
  1129. |> >In article <pjl.765402948@graceland.att.com>, pjl@graceland.att.com (Paul J. Lucas) writes:
  1130. |> >> In <rmah-030494071250@rmah.dialup.access.net> rmah@panix.com (Robert S. Mah) writes:
  1131.  
  1132. |> >>>I have the following code...
  1133.  
  1134. |> >>>  class Test{
  1135. |> >>>    public:
  1136. |> >>>      Test() { }
  1137. |> >>>      virtual ~Test();
  1138. |> >>>      virtual int Pure() = 0;
  1139. |> >>>      virtual int Foo();
  1140. |> >>>  };
  1141.  
  1142. |> >>>  Test::~Test() { Pure(); }
  1143.  
  1144. |> >>>  int Test::Foo() { return Pure(); }
  1145.  
  1146.  
  1147. |> >>>In Symantec C++ (Mac v7.0) it returns the error...
  1148.  
  1149. |> >>>  'Test::Pure' is a pure virtual function
  1150.  
  1151. |> >>>in the d'tor.  If I use an empty d'tor, it compiles fine like it should.
  1152.  
  1153. |> >>>However, Metrowerks C++ compiles the Pure() call in the d'tor without
  1154. |> >>>complaining.
  1155.  
  1156. |> >>>Which is right?  Is this legal C++ code?  I can't imagine why I can't call
  1157. |> >>>a pure virtual function from a dtor, but C++ is a strange language...
  1158.  
  1159. |> >>     The code is legal.  I can find nothing forbidding it in the ARM;
  1160. |> >>     *con*structors are another matter.
  1161.  
  1162. |> >I think we have different readings of ARM 12.7, pg. 294, then:
  1163. |> ># Member functions may be called in constructors and destructors. This implies
  1164. |> ># that virtual functions may be called (directly or indirectly). The function
  1165. |> ># called will be the one defined in the constructor's (or destructor's) own
  1166. |> ># class or its bases, but *not* any function overriding it in a derived class.
  1167. |> ># This ensures that unconstructed objects will not be accessed during
  1168. |> ># construction or destruction.
  1169.  
  1170. |> >While the sentence on page 295 talking about pure virtuals only talks about
  1171. |> >constructors,
  1172.  
  1173. |>     Bingo!
  1174.  
  1175. |> >it seems clear to me that it applies equally to destructors,
  1176.  
  1177. |>     There is no room for supposition.  It either says it or it doesn't.
  1178. |>     Given that it is not expressly forbidden, it is allowed.
  1179.  
  1180. |> >This behavior makes perfect sense: Once a virtual destructor is called, any
  1181. |> >of the "derived objects" have already been destructed and thus their "class
  1182. |> >invariants" no longer hold, which makes calling members defined there very
  1183. |> >dangerous.
  1184.  
  1185. |>     While the poster's code has a virtual destructor, that's not the
  1186. |>     issue; the issue is whether a pure virtual *function* can be
  1187. |>     called from a destructor.  Since objects are destroyed bottom
  1188. |>     up, the most-derived function *can* be called it seems.
  1189. |>     Obviously, this is not true for CONstruction since the most
  1190. |>     derived part hasn't been constructed yet.
  1191.  
  1192. Since when are objects destroyed bottom up?  The most derived class is
  1193. destructed first, then the next, and the base class is destructed
  1194. last.  (Destruction is in the opposite order of construction.)
  1195.  
  1196. In particular, when executing the destructor for a class, all derived
  1197. classes have already been destructed.
  1198.  
  1199. |>     So perhaps the "omission" in the ARM is intentional.
  1200.  
  1201. I don't think so.
  1202. --
  1203. James Kanze                       email: kanze@lts.sel.alcatel.de
  1204. GABI Software, Sarl., 8 rue du Faisan, F-67000 Strasbourg, France
  1205. Conseils en informatique industrielle --
  1206.                    -- Beratung in industrieller Datenverarbeitung
  1207.  
  1208. +++++++++++++++++++++++++++
  1209.  
  1210. >From thor@telerama.lm.com (Tom Moertel)
  1211. Date: 5 Apr 1994 18:59:34 -0400
  1212. Organization: MSA, Inc., CSG Technologies Division
  1213.  
  1214. Robert S. Mah (rmah@panix.com) wrote:
  1215. : I have the following code...
  1216. :
  1217. :   class Test{
  1218. :     public:
  1219. :       Test() { }
  1220. :       virtual ~Test();
  1221. :       virtual int Pure() = 0;
  1222. :       virtual int Foo();
  1223. :   };
  1224. :
  1225. :   Test::~Test() { Pure(); }
  1226. :
  1227. :   int Test::Foo() { return Pure(); }
  1228.  
  1229.  
  1230. : In Symantec C++ (Mac v7.0) it returns the error...
  1231. :   'Test::Pure' is a pure virtual function
  1232. : in the d'tor.  If I use an empty d'tor, it compiles fine like it should.
  1233.  
  1234. [Snip]
  1235.  
  1236. : Which is right?  Is this legal C++ code?  I can't imagine why I can't call
  1237. : a pure virtual function from a dtor, but C++ is a strange language...
  1238.  
  1239.  
  1240. Strictly speaking, it's legal, but like calls from constructors, calls
  1241. from destructors do not use virtual lookup to call member functions of
  1242. derived classes.  For example, calling Pure() from Test's destructor
  1243. is equivalent to calling Test::Pure().  When SC++ complains about
  1244. calling a pure virtual function from a destructor, it's actually
  1245. trying to do you a favor.  It reasons that because Pure() is pure
  1246. virtual, Test::Pure() doesn't exist (faulty conclusion), and therefore
  1247. you have made a mistake.
  1248.  
  1249. What's weird is that if you actually define Test::Pure(), which 
  1250. is a perfectly legitimate thing to do, SC++ still gives you the 
  1251. error.  There is a solution, however: just call Test::Pure() 
  1252. explicitly.  Not only does this work, it helps readers of your 
  1253. code better understand what is really happening.
  1254.  
  1255. I've tried this, and it works fine:
  1256.  
  1257. class Test
  1258. {
  1259.     virtual int Pure() = 0;
  1260.     virtual ~Test();
  1261. };
  1262.  
  1263. int Test::Pure() { return 0; }
  1264. Test::~Test() { Test::Pure(); }
  1265.  
  1266. // doesn't compile: Test::~Test() { Pure(); }
  1267.  
  1268. -- 
  1269. Tom Moertel                          Interests:  Software Engineering,
  1270.                                                  Symbolic Mathematics,
  1271. MSA, CSG Technologies Division                   Algorithms,
  1272. thor@telerama.lm.com                             Itchy-Scratchy Theory.
  1273.  
  1274. +++++++++++++++++++++++++++
  1275.  
  1276. >From Reid Ellis <rae@alias.com>
  1277. Date: Sat, 9 Apr 1994 21:17:33 GMT
  1278. Organization: Alias Research, Inc., Toronto ON Canada
  1279.  
  1280. Robert Mah <rmah@panix.com> wrote:
  1281. |I have the following code...
  1282. |
  1283. |  class Test{
  1284. |    public:
  1285. |      Test() { }
  1286. |      virtual ~Test();
  1287. |      virtual int Pure() = 0;
  1288. |      virtual int Foo();
  1289. |  };
  1290. |
  1291. |  Test::~Test() { Pure(); }
  1292. |
  1293. |  int Test::Foo() { return Pure(); }
  1294. |
  1295. |In Symantec C++ (Mac v7.0) it returns the error...
  1296. |  'Test::Pure' is a pure virtual function
  1297. |in the d'tor.  If I use an empty d'tor, it compiles fine like it should.
  1298.  
  1299. In "The C++ Programming Language, 2nd Edition", in section r.12.7 [p
  1300. 582] it talks about constructors [but not destructors] and pure
  1301. virtual methods:
  1302.  
  1303.             The effect of calling a pure virtual function directly or
  1304.             indirectly for the object being constructed from a
  1305.             constructor, except using explicit qualification, is
  1306.             undefined (see section r.10.3).
  1307.  
  1308. In every other case w.r.t. virtual functions, constructors and
  1309. destructors mirror each other, so I would gather that this case is no
  1310. exception.  Seems like Symantec C++ is justified in signalling an
  1311. error.  Other implementations may do other things, since this use is
  1312. explicitly "undefined".  Making it an error keeps you from writing
  1313. non-portable code, IMHO.
  1314.  
  1315. Reid
  1316. --
  1317. - -
  1318. Reid Ellis, Alias Research Inc.
  1319. +1 416 362 9181 <rae@Alias.com>
  1320.  
  1321. ---------------------------
  1322.  
  1323. >From radicallib@aol.com (RadicalLib)
  1324. Subject: Symantec C++ 7.0 (Full)- Initial Impressions
  1325. Date: 8 Apr 1994 16:58:05 -0400
  1326. Organization: America Online, Inc. (1-800-827-6364)
  1327.  
  1328.      I haven't had time to evaluate the new state of the C++ translator, or
  1329. other compile/code-generation issues... But here's some comments for what they
  1330. are worth.
  1331.  
  1332.      The THINK Project Manager hasn't changed much.  The addition of a
  1333. trivially configurable scripts menu being the major, and a welcome, change. 
  1334. One minor change that I think will also be welcomed is a Preferences dialog for
  1335. C++ Warnings... Every warning is now individually toggleable.
  1336.  
  1337.      It is in the additions, (those things only in the $150 upgrade, NOT in the
  1338. free update), that things get interesting...
  1339.  
  1340.      1) THINK Class Library 2.0 - What we've been waiting for:  A true C++
  1341. application framework.  Since this is real C++, the TCL is no longer supported
  1342. by the C compiler... C TCL users will have to stick with 1.1.3.  Some features:
  1343.      -Real constructors and destructors, (the old IClassName methods are still
  1344. there for backwards compatibility).
  1345.      -Multiple inheritance is used in the TCL.
  1346.      -Exceptions are supported via macros, which will smoothly become native
  1347. exception handling when they introduce it in the compiler.
  1348.      -A large subset of the proposed Run-Time Type Identification (RTTI)
  1349. standard is also implemented in macros.  See section 13.5 in The C++
  1350. Programming Language, 2nd Ed. by Stroustrup for an explanation of the
  1351. usefulness of RTTI, if you are unfamiliar with this.
  1352.      -A new feature called Object I/O provides an IOStream-based binary object
  1353. reading/writing mechanism.
  1354.      -A new class called CSaver is built with Object I/O to provide persistence
  1355. for documents, (e.g. window size and position are stored with saved documents
  1356. auto-magically).
  1357.      -Apple Event support is now comprehensive: For example, the new TCL
  1358. starter app, AEStarter, is now scriptable, recordable, has 15 Apple Events
  1359. besides the Required Suite and 13 AE Classes.  A few examples of the new Events
  1360. and classes: move, delete, duplicate, close, application, character, document,
  1361. file and word.  Seems like a pretty nice base-line to me.
  1362.  
  1363.      2) THINK Inspector - Anyone who has already been doing object-oriented
  1364. programming will immediately recognize a new best friend.  What we'd been doing
  1365. already by a lot of dereferencing and typing is now handled in a smooth and
  1366. user-friendly fashion by this application which can be launched from the THINK
  1367. Debugger.
  1368.      Each Inspector window provides three panes: A Class pane, a Data pane and
  1369. a Function pane.
  1370.      -By clicking on "::" in the Class pane you see your global functions.
  1371.      -By double-clicking on a function in the Function pane the debugger Code
  1372. window goes to that function's code.
  1373.      -If you select a class name in the Class pane, the class's methods are
  1374. displayed in the Function window and any current instances are displayed in the
  1375. data window.
  1376.      -Objects displayed in the data window have a triangle... Which, when
  1377. turned down, shows you the name and current value of the object's members.
  1378.      -If one of the object's members is itself an object, it also has a
  1379. triangle.
  1380.      -One or more non-contiguous selections can be made of member data, which
  1381. you can then bump over to the debugger's Data window... Though there is a
  1382. slight bug with this and data members of type double, (it's reported and
  1383. acknowledged by Symantec).
  1384.      -When an object is selected in the Inspector's Data window, you can have
  1385. the Inspector go to the line of code that was responsible for allocating the
  1386. object.  (!)
  1387.      -By doing a "Select All" in the Class pane, ALL current objects will be
  1388. displayed.  Yes, that includes those that aren't pointed to by anything.  (!!)
  1389.      -The Inspector is a user-interface triumph.  There is NO typing at all in
  1390. the Inspector, everything is clicked, using interface elements we already know
  1391. and love.
  1392.  
  1393.      3) Visual Architect- This application provides a resource building
  1394. environment similar to ResEdit/AppMaker with the code generation capabilities I
  1395. am familiar with from AppMaker.  But it's a lot more powerful.  Explicitly
  1396. based on the TCL, it facilitates the derivation of new classes for custom
  1397. interface elements/views.  Basically, if you ObjectThink you'll love this
  1398. application builder.  A couple observations:
  1399.      -It is well integrated with the THINK Project Manager, even going so far
  1400. as to close files that are open in the TPM which it is about to re-generate,
  1401. (Apple Events begin to really pay off!).
  1402.      -Has double-file generation, like AppMaker, so that for each new class
  1403. introduced there are two files generated, one for your custom code, (the
  1404. higher-level file), one with code that is entirely written by the Visual
  1405. Architect, (the lower-level file).
  1406.      -The lower-level files, which in AppMaker are called p-files for the p in
  1407. the filename that denotes them, are denoted with a prepended "x_" by the Visual
  1408. Architect which will undoubtedly lead to them being called the x files, (pun
  1409. surely intended).
  1410.      -Has excellent Balloon Help support.
  1411.      -Has the usual stuff we expect from this sort of thing: a tear-off Tools
  1412. menu, good Alignment support, drawing tools, etc.
  1413.  
  1414.  
  1415.      I've suffered as much as anyone with the buggy C++ 6.0 release.  But all
  1416. in all, this release is well on its way to restoring my faith.  I think the
  1417. Inspector, in particular, will really raise the bar on the sort of help we
  1418. start to expect from our Macintosh development tools.
  1419.  
  1420.     I am
  1421.        Radical Liberation.
  1422.  
  1423. +++++++++++++++++++++++++++
  1424.  
  1425. >From nagle@netcom.com (John Nagle)
  1426. Date: Sun, 10 Apr 1994 05:16:07 GMT
  1427. Organization: NETCOM On-line Communication Services (408 241-9760 guest)
  1428.  
  1429.      What are the new manuals like?
  1430.  
  1431.                     John Nagle
  1432.  
  1433. +++++++++++++++++++++++++++
  1434.  
  1435. >From radicallib@aol.com (RadicalLib)
  1436. Date: 11 Apr 1994 02:55:05 -0400
  1437. Organization: America Online, Inc. (1-800-827-6364)
  1438.  
  1439. In article <nagleCo12Mv.Irs@netcom.com>, nagle@netcom.com (John Nagle) writes:
  1440.  
  1441. >     What are the new manuals like?
  1442.  
  1443. Very big.  And quite improved.  I was going through the tutorials to learn the
  1444. Visual Architect and was having a fairly fun time.  The section to help you
  1445. begin to understand the TCL is much better than before, (I wish it had been
  1446. there when I was trying to get over that initial learning hump).  Otherwise,
  1447. the new manuals are pretty much like the 6.0 manuals... even the same cover
  1448. design.
  1449.  
  1450.  
  1451. ---------------------------
  1452.  
  1453. >From haney@maverick.llnl.gov (Scott W. Haney)
  1454. Subject: Symantec technical support not home
  1455. Date: 29 Mar 94 20:13:55 GMT
  1456. Organization: Magnetic Fusion Energy - LLNL
  1457.  
  1458.   I received a flier from Symantec advertising C++ version 7.0 and had
  1459. some problems parsing the marketing-speak description of the features.
  1460. Foolishly thinking that they'd be happy to help out a long-time
  1461. customer who was thinking about spending $250 on their products (7.0
  1462. upgrade + PPC kit), I thought I call them up to find out more about
  1463. these features. I called there NON-toll-free number and, after
  1464. listening to a long announcement about how they were going to start
  1465. charging me for technical support, I got a person who the phone menu
  1466. said knew about "product information". Unfortunately, the "product
  1467. information" I asked for was too specific so they said I must talk to
  1468. technical support. I asked if they could transfer me and they said they 
  1469. couldn't. OK, I called the number again and listend to the long message
  1470. and chose the technical support option. I stayed on hold for 30 minutes
  1471. (yes you read that right) and never got to talk to a person (although I
  1472. did get to listen to a lot of elevator music and hear the message "your
  1473. phone call is very important to us" about 200 times). I called back customer
  1474. support and calmly explained that I couldn't get through to customer support
  1475. so could I leave a number so they could get back to me. I was informed that
  1476. with the new "fee-for-support" plan, they never did call-backs, even to
  1477. give information to potential customers. I then asked the customer support rep.
  1478. what I should do to get my question answered and she said my only option was
  1479. to talk to technical support. Since I had already, I thought, made a reasonable
  1480. attempt to do this I asked to talk to her supervisor. Unfortunately, he
  1481. was at lunch. I asked if I could leave my number for him to call me back.
  1482. She said he wouldn't call me back and reminded me that they offer a 60 day
  1483. money back guarantee, so why didn't I just buy the product and if it didn't
  1484. have the features I needed I could get a refund. Remaining calm, I said
  1485. that I wouldn't do business with Symantec under these circumstances. She
  1486. said she was sorry to hear that but there was nothing she could do.
  1487.   I've seen Symantec get flamed almost continuously for the past several months
  1488. and, quite frankly, I thought some of it was a bit unfair. However, this
  1489. experience has left me feeling that the company doesn't really care very
  1490. much about keeping customers. In particular, I've never before had a company 
  1491. make me jump through hoops in order to get info about a product.
  1492.   I'm fairly close to deciding not to give Symantec any more of my business.
  1493. However, I'm willing to grant that I hit a bad day in technical support land
  1494. and give Symantec another chance. Therefore, I wonder if someone from Symantec
  1495. could contact me via email to answer a few brief questions about the THINK
  1496. Project Manager.
  1497.  
  1498. Scott
  1499.  
  1500.  
  1501. --
  1502. - -----------------------------------------------------------------------
  1503. Scott W. Haney        || Lawrence Livermore N'Lab || The above views are 
  1504. haney@random.llnl.gov || P.O. Box 808;  L-637     || mine and not neces-
  1505. (510) 423-6308        || Livermore, CA  94550     || sarily LLNL's.
  1506.  
  1507. +++++++++++++++++++++++++++
  1508.  
  1509. >From sbill@informix.com (Bill Stackhouse)
  1510. Date: 29 Mar 1994 23:39:37 GMT
  1511. Organization: Informix Software, Inc.
  1512.  
  1513. In article <haney.764972035@maverick> haney@maverick.llnl.gov (Scott W. Haney) writes:
  1514. >  I received a flier from Symantec advertising C++ version 7.0 and had
  1515. >some problems parsing the marketing-speak description of the features.
  1516. >Foolishly thinking that they'd be happy to help out a long-time
  1517. >customer who was thinking about spending $250 on their products (7.0
  1518. >upgrade + PPC kit), I thought I call them up to find out more about
  1519. >these features. I called there NON-toll-free number and, after
  1520.  
  1521. [bunch of complaints deleted]
  1522.  
  1523. Phil Shapiro is a great resource and always gets a response back to me
  1524. in short order. His email address is phils@bedford.symantec.com  If you
  1525. read the programming group, you know about Phil. You should have tried
  1526. him first since you probably knew that your questions were more
  1527. technical than could be answered by a sales person. Did you do that just
  1528. to have a reason to complain?
  1529.  
  1530. Yes they handled the call very badly and I would have been pissed off.
  1531. If you had had a real technical support question and not a sales question
  1532. I bet you could have gotten it answered.
  1533.  
  1534. If you have been a Think C user, you have a good feel for what any
  1535. version of Think C will look like. The 60 day MBG is a great way to
  1536. test drive the new version if you have some nagging unanswered
  1537. questions.  It sounds like the person handled that part correctly given
  1538. that tech support was not an option and this person did not have an
  1539. answer for you.  May be she/he should have but they did not. They 
  1540. probably get 100's of calls a day and many of them from people that
  1541. probably never planned to buy. They have to make a business decission
  1542. about how to allocate their dollars.
  1543.  
  1544. Faning the flames does not help anyone. If you don't like Symantec
  1545. then you just don't like them. There are many people who still do.
  1546. Except for some C++ bugs, Think C is still a great product.
  1547.  
  1548. Again, give Phil some direct questions and see if that helps.
  1549.  
  1550. Flame me if you want, I will not listen. I am tired of the petty
  1551. complaints over the upgrage fees and what a bad product Think C
  1552. has become. $150/$250 is cheap if you are doing real development 
  1553. and if you are just playing around, then stick with version 6.
  1554. There are some of us that have to have one of each compiler so that 
  1555. the others can have development tools.
  1556.  
  1557. Bill
  1558.  
  1559.  
  1560.  
  1561. +++++++++++++++++++++++++++
  1562.  
  1563. >From mahboud@aggroup.com (mahboud)
  1564. Date: Tue, 29 Mar 1994 16:26:38 -0800
  1565. Organization: AG Group, Inc.
  1566.  
  1567. In article <haney.764972035@maverick>, haney@maverick.llnl.gov (Scott W.
  1568. Haney) wrote:
  1569.  
  1570. >   [description of hellish phone experience]
  1571. > Scott
  1572.  
  1573. Scott, please let us know what you find out.
  1574.  
  1575. I am tempted to go through and print out all the flames and mail them to
  1576. Symantec.  Maybe that'll wake them up.
  1577.  
  1578. I have had similar experience with calling Symantec.  I had a profiler
  1579. problem with THINK C and after being on the phone for quite a long time,
  1580. the person answering couldn't help me (he read me some passages out of the
  1581. manual!) and told me that there is no one there who know much about the
  1582. profiler.
  1583.  
  1584. And they expect us to start paying for this sort of service??  
  1585.  
  1586. -mahboud
  1587. - -------------------------------------------------------------
  1588. Mahboud Zabetian
  1589. mahboud@aggroup.com
  1590. ag group, inc.
  1591. 2540 camino diablo, suite 200
  1592. walnut creek, ca 94596
  1593. 510-937-7900 voice
  1594. 510-937-2479 fax
  1595. 510-937-6704 ara
  1596. ftp.aggroup.com anonymous ftp
  1597.  
  1598. +++++++++++++++++++++++++++
  1599.  
  1600. >From howard@netcom.com (Howard Berkey)
  1601. Date: Wed, 30 Mar 1994 04:57:09 GMT
  1602. Organization: Netcom Online Communications Services (408-241-9760 login: guest)
  1603.  
  1604. In article <haney.764972035@maverick> haney@maverick.llnl.gov (Scott W. Haney) writes:
  1605. [unfortunately typical tale of Symantec phone support woe deleted]
  1606.  
  1607. >  I've seen Symantec get flamed almost continuously for the past several months
  1608. >and, quite frankly, I thought some of it was a bit unfair. However, this
  1609. >experience has left me feeling that the company doesn't really care very
  1610. >much about keeping customers. In particular, I've never before had a company 
  1611. >make me jump through hoops in order to get info about a product.
  1612.  
  1613. While your story is pretty ugly, and indeed I'm saddened (but not
  1614. surprised) to hear that Symantec is now charging for tech support on a
  1615. product which (in general) requires it to some extent, all I can say
  1616. is if you think that was bad try dealing with IBM sales sometime.
  1617.  
  1618. At work I had to talk to a salesman for 30 minutes once just trying to
  1619. convince him that I had a RS/6000 when all I wanted to buy was an OS
  1620. upgrade or something similar.  The conversation went something like:
  1621.  
  1622. Sales droid:  "I'm veree sorree, all we show at your site are AS/400
  1623. computers."
  1624.  
  1625. Me:  "Trust me.  I develop on this RS/6000 for a living.  Here's what
  1626. uname -a says.  Here's the serial number. [etc]".
  1627.  
  1628. Sales droid: "Please hold."
  1629.  
  1630. (5 mins later)
  1631.  
  1632. Droid:  "I'm veree sorree..."
  1633.  
  1634. That went on for a half hr. until he got ahold of our regular sales
  1635. rep.  
  1636.  
  1637. So good luck with Symantec... at least they believe you when you call
  1638. :-)
  1639.  
  1640. -H-
  1641.  
  1642.  
  1643.  
  1644.  
  1645. -- 
  1646. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1647. Howard Berkey                                             howard@netcom.com   
  1648.                             Kill the Wabbit!
  1649.  
  1650. +++++++++++++++++++++++++++
  1651.  
  1652. >From d88-jwa@mumrik.nada.kth.se (Jon W‰tte)
  1653. Date: 30 Mar 1994 07:53:19 GMT
  1654. Organization: The Royal Institute of Technology
  1655.  
  1656. In <haney.764972035@maverick> haney@maverick.llnl.gov (Scott W. Haney) writes:
  1657.  
  1658. >  I'm fairly close to deciding not to give Symantec any more of my business.
  1659. >However, I'm willing to grant that I hit a bad day in technical support land
  1660. >and give Symantec another chance. Therefore, I wonder if someone from Symantec
  1661.  
  1662. Actually, I think you hit the bad product for Symantec.
  1663. Symantec should be selling word processors, mail applications
  1664. and project organization chart drawing programs, not development
  1665. tools. They should separate out development tools into a whole
  1666. subsidiary company, with its OWN support channels, management,
  1667. marketing budget, ...
  1668.  
  1669. That's about the only way they can believably stay at the forefront
  1670. of the tools business.
  1671. -- 
  1672.  -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  1673.     Not speaking for the Liberian Government.
  1674.  
  1675. +++++++++++++++++++++++++++
  1676.  
  1677. >From d88-jwa@mumrik.nada.kth.se (Jon W‰tte)
  1678. Date: 30 Mar 1994 07:56:09 GMT
  1679. Organization: The Royal Institute of Technology
  1680.  
  1681. In <2nae7p$5bg@infmx.informix.com> sbill@informix.com (Bill Stackhouse) writes:
  1682.  
  1683. >Phil Shapiro is a great resource and always gets a response back to me
  1684. >in short order. His email address is phils@bedford.symantec.com  If you
  1685.  
  1686. >Again, give Phil some direct questions and see if that helps.
  1687.  
  1688. I would say DON'T.
  1689.  
  1690. Phil works on the compiler.
  1691.  
  1692. He has better things to do than answering technical support letters.
  1693.  
  1694. The only time I sent a direct letter was regarding some reproducible
  1695. bug in the compiler which didn't quite make it through the normal tech
  1696. support channels.
  1697.  
  1698. -- 
  1699.  -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  1700.     Not speaking for the Liberian Government.
  1701.  
  1702. +++++++++++++++++++++++++++
  1703.  
  1704. >From haney@maverick.llnl.gov (Scott W. Haney)
  1705. Date: 30 Mar 94 16:42:03 GMT
  1706. Organization: Magnetic Fusion Energy - LLNL
  1707.  
  1708. sbill@informix.com (Bill Stackhouse) writes:
  1709.  
  1710. >In article <haney.764972035@maverick> haney@maverick.llnl.gov (Scott W. Haney) writes:
  1711. >>  I received a flier from Symantec advertising C++ version 7.0 and had
  1712. >>some problems parsing the marketing-speak description of the features.
  1713. >>Foolishly thinking that they'd be happy to help out a long-time
  1714. >>customer who was thinking about spending $250 on their products (7.0
  1715. >>upgrade + PPC kit), I thought I call them up to find out more about
  1716. >>these features. I called there NON-toll-free number and, after
  1717.  
  1718. >[bunch of complaints deleted]
  1719.  
  1720. >Phil Shapiro is a great resource and always gets a response back to me
  1721. >in short order. His email address is phils@bedford.symantec.com  If you
  1722. >read the programming group, you know about Phil. You should have tried
  1723. >him first since you probably knew that your questions were more
  1724. >technical than could be answered by a sales person. Did you do that just
  1725. >to have a reason to complain?
  1726.  
  1727. Bill,
  1728.  
  1729.   I think you misunderstood my message. Let me explain.
  1730.   Over the past few years I *have* sent mail, usually from CompuServe,
  1731. to people at Symantec, including Phil Shapiro. Generally, I did not receive
  1732. a reply. The messages were generally questions or comments, written
  1733. civilly. I don't hold the lack of replies against Symantec, I simply
  1734. determined that this was not a good way to get my questions answered.
  1735. Apparently your experience has been different. Fair enough.
  1736.   Second, I spent 1/2 on hold waiting for TECHNICAL support. Contrary to
  1737. your assertion, they were the correct people to answer my question.
  1738. Furthermore, they have promptly answered this sort of question for me
  1739. in the past.
  1740.   Third, I called Symantec with the inclination to plunk down $250 bucks
  1741. on the 7.0+PPC upgrade. Believe me, I have much better things to do with my 
  1742. time than sit on the phone for an hour listening to music. Symantec would
  1743. have my order now if I could have simply talked to a person who was willing
  1744. to get about 5 minutes of technical questions answered. 
  1745.  
  1746. >Yes they handled the call very badly and I would have been pissed off.
  1747. >If you had had a real technical support question and not a sales question
  1748. >I bet you could have gotten it answered.
  1749.  
  1750. I called the Technical support line three times. When you call Symantec 
  1751. Technical Support you go through a phone menu in order
  1752. to have your call directed. The 1st time I called I chose customer service
  1753. (option 2). I was told they only knew general information. They said to call
  1754. technical support. Fair enough. I then called again and 
  1755. chose technical support (option 4). I then waited 1/2 hour ON HOLD before I 
  1756. hung up. I never talked to a human. My call was not screened. I then called 
  1757. customer service, told them I couldn't get through. I was basically told that
  1758. my only two options were to buy the product or to try technical support again.
  1759. They wouldn't even take my number to call me back when things had calmed down.
  1760. I've been dealing with computer companies for many years and have never
  1761. run into this. Heck, people from Symantec have called me back in the past.
  1762.  
  1763. >If you have been a Think C user, you have a good feel for what any
  1764. >version of Think C will look like. The 60 day MBG is a great way to
  1765. >test drive the new version if you have some nagging unanswered
  1766. >questions.  It sounds like the person handled that part correctly given
  1767. >that tech support was not an option and this person did not have an
  1768. >answer for you.  May be she/he should have but they did not. They 
  1769. >probably get 100's of calls a day and many of them from people that
  1770. >probably never planned to buy. They have to make a business decission
  1771. >about how to allocate their dollars.
  1772.  
  1773. I think you've missed the point. I couldn't talk to people that Symantec
  1774. said would answer my questions. I made, I think, a reasonable attempt to
  1775. do this. Or are you saying I should haved stayed on hold for longer than
  1776. a half hour.
  1777.  
  1778. >Faning the flames does not help anyone. If you don't like Symantec
  1779. >then you just don't like them. There are many people who still do.
  1780. >Except for some C++ bugs, Think C is still a great product.
  1781.  
  1782. Actually, I do like Symantec. I've spent lots of money with them in the
  1783. past and recommended their products to others. I was getting ready to
  1784. spend more money with them. You're clearly misreading my motives. I was
  1785. puzzled by this episode, plus a little pissed off. I can't believe you'd
  1786. feel any different if it happened to you.
  1787.  
  1788. >Again, give Phil some direct questions and see if that helps.
  1789.  
  1790. >Flame me if you want, I will not listen. I am tired of the petty
  1791. >complaints over the upgrage fees and what a bad product Think C
  1792. >has become. $150/$250 is cheap if you are doing real development 
  1793. >and if you are just playing around, then stick with version 6.
  1794. >There are some of us that have to have one of each compiler so that 
  1795. >the others can have development tools.
  1796.  
  1797. I don't intend to flame you. However, I hope you will listen to what I am
  1798. actually saying rather than reading in stuff based on other people's posts.
  1799. For instance, I never complained about the fee. I also explicitly said that
  1800. I may have hit a bad day for technical support and was willing to give
  1801. Symantec the benefit of the doubt. You should have read my message as an
  1802. invitation to Symantec to try to set things right with a long-time customer
  1803. who was, for whatever reason, treated very poorly. Symantec has taken me
  1804. up on this invitation: I just got a mail message Tom Emerson of Symantec
  1805. saying he would answer my questions. 
  1806.  
  1807. Scott
  1808.  
  1809. >Bill
  1810.  
  1811.  
  1812. --
  1813. - -----------------------------------------------------------------------
  1814. Scott W. Haney        || Lawrence Livermore N'Lab || The above views are 
  1815. haney@random.llnl.gov || P.O. Box 808;  L-637     || mine and not neces-
  1816. (510) 423-6308        || Livermore, CA  94550     || sarily LLNL's.
  1817.  
  1818. +++++++++++++++++++++++++++
  1819.  
  1820. >From Chris Russo <chris@sonicsys.com>
  1821. Date: 30 Mar 1994 21:45:50 GMT
  1822. Organization: Sonic Systems, Inc.
  1823.  
  1824. In article <2nae7p$5bg@infmx.informix.com> Bill Stackhouse,
  1825. sbill@informix.com writes:
  1826. >In article <haney.764972035@maverick> haney@maverick.llnl.gov (Scott W.
  1827. Haney) writes:
  1828. >>  I received a flier from Symantec advertising C++ version 7.0 and had
  1829. >>some problems parsing the marketing-speak description of the features.
  1830. >>Foolishly thinking that they'd be happy to help out a long-time
  1831. >>customer who was thinking about spending $250 on their products (7.0
  1832. >>upgrade + PPC kit), I thought I call them up to find out more about
  1833. >>these features. I called there NON-toll-free number and, after
  1834. >
  1835. >[bunch of complaints deleted]
  1836. >
  1837. >Phil Shapiro is a great resource and always gets a response back to me
  1838. >in short order. His email address is phils@bedford.symantec.com  If you
  1839. >read the programming group, you know about Phil. You should have tried
  1840. >him first since you probably knew that your questions were more
  1841. >technical than could be answered by a sales person. Did you do that just
  1842. >to have a reason to complain?
  1843.  
  1844. Bill, I don't think that you're being very fair with Scott.  The internet,
  1845. albeit an awesome resource, should not be a developer's only option when
  1846. confronted with a technical support problem.
  1847.  
  1848. Just as a reality-check, Scott, I had a problem VERY similar to the one
  1849. you had.  I wanted to call Symantec to report a few Source Server bugs and
  1850. to find out when the next revision was due.  After resolving the phone 
  1851. alias that they give you in the manual, I waited on hold for _45_
  1852. minutes!!
  1853. Long distance, no less.  If it were an 800 number, I could maybe
  1854. understand;
  1855. but not even offering some type of callback service was a bit much.
  1856.  
  1857. After I got through to the tech support guy, I received only further
  1858. frustration.  He didn't know anything about ANY of the bugs that I was
  1859. wondering about. "Uh, we haven't encountered that one."  Yeah, right.
  1860. They only happen on several of our machines here with only BASIC use of
  1861. the Source Server stuff.
  1862.  
  1863. >Yes they handled the call very badly and I would have been pissed off.
  1864. >If you had had a real technical support question and not a sales question
  1865. >I bet you could have gotten it answered.
  1866.  
  1867. Well, I can say that I wasn't given any satisfactory answer.  I consider
  1868. my Technonsupport experience with Symantec to have been a total waste of
  1869. my time and my company's money.  I don't plan on going through it again
  1870. in the future.
  1871.  
  1872. >If you have been a Think C user, you have a good feel for what any
  1873. >version of Think C will look like. The 60 day MBG is a great way to
  1874. >test drive the new version if you have some nagging unanswered
  1875. >questions.  It sounds like the person handled that part correctly given
  1876. >that tech support was not an option and this person did not have an
  1877. >answer for you.  May be she/he should have but they did not. They 
  1878. >probably get 100's of calls a day and many of them from people that
  1879. >probably never planned to buy. They have to make a business decission
  1880. >about how to allocate their dollars.
  1881.  
  1882. And WE have to make business decisions about how to handle ours.  I
  1883. wish I would have paid more attention to the net in the first place,
  1884. and I appreciate real life experiences as related by Scott Haney.  They
  1885. help me to make choices.  The only better teacher than experience is
  1886. other peoples' experience.
  1887.  
  1888. >Faning the flames does not help anyone. If you don't like Symantec
  1889. >then you just don't like them. There are many people who still do.
  1890. >Except for some C++ bugs, Think C is still a great product.
  1891.  
  1892. Once again, I appreciate reports like Scott's.  I don't think that he
  1893. was trying to fan any flames.  He was just trying to warn others by
  1894. relating his personal experiences.  There are many people out there
  1895. who value good technical support over other features of a product.
  1896. He might be saving those people a lot of frustration.
  1897.  
  1898. >Again, give Phil some direct questions and see if that helps.
  1899. >
  1900. >Flame me if you want, I will not listen. I am tired of the petty
  1901. >complaints over the upgrage fees and what a bad product Think C
  1902. >has become. $150/$250 is cheap if you are doing real development 
  1903. >and if you are just playing around, then stick with version 6.
  1904. >There are some of us that have to have one of each compiler so that 
  1905. >the others can have development tools.
  1906. >
  1907. >Bill
  1908.  
  1909. I, for one, don't consider his _complaints_ to be petty.
  1910.  
  1911. Chris Russo
  1912.  
  1913. Chris Russo
  1914. Macintosh Software Developer
  1915. Sonic Systems, Inc.                        (408) 736-1900 Ext #107
  1916. Sunnyvale, California, US
  1917.  
  1918. +++++++++++++++++++++++++++
  1919.  
  1920. >From Joe Francis <Joe.Francis@dartmouth.edu>
  1921. Date: 31 Mar 1994 01:28:50 GMT
  1922. Organization: Smooth Roo Software
  1923.  
  1924. Bill Stackhouse, sbill@informix.com writes:
  1925. > Phil Shapiro is a great resource and always gets a response back to me
  1926. > in short order. His email address is phils@bedford.symantec.com  If you
  1927. > read the programming group, you know about Phil. You should have tried
  1928. > him first since you probably knew that your questions were more
  1929. > technical than could be answered by a sales person. 
  1930.  
  1931. I think you need to rent a clue.  When you have technical questions
  1932. about a product, sales and/or tech support are the people in the business
  1933. of answering your questions.  Bugging the product engineers to do, on
  1934. their own time, what the support staff is paid to do, is not the correct
  1935. solution.
  1936.  
  1937. > Did you do that just to have a reason to complain?
  1938.  
  1939. Did you write this just to get flamed?
  1940.  
  1941. - ------------------------------------------------------------------------
  1942. No matter how subtle the wizard, a knife between the shoulder blades
  1943. will seriously cramp his style.
  1944. - ------------------------------------------------------------------------
  1945.  
  1946. +++++++++++++++++++++++++++
  1947.  
  1948. >From amanda@intercon.com (Amanda Walker)
  1949. Date: Wed, 30 Mar 1994 16:02:27 -0500
  1950. Organization: InterCon Systems Corporation, Herndon, VA USA
  1951.  
  1952. sbill@informix.com (Bill Stackhouse) writes:
  1953. > Yes they handled the call very badly and I would have been pissed off. 
  1954. > If you had had a real technical support question and not a sales 
  1955. > question I bet you could have gotten it answered. 
  1956.  
  1957. Rule Number One of Commercial Software: Do not piss off the customers.
  1958. Rule Number Two: See Rule Number One.
  1959.  
  1960. It doesn't matter if he was calling about the color of the box; Symantec 
  1961. should have enough people to answer their phones.  There's more to selling 
  1962. software than making pretty yellow boxes, after all. 
  1963.  
  1964. > $150/$250 is cheap if you are doing real development and if 
  1965. > you are just playing around, then stick with version 6. 
  1966.  
  1967. Or just chuck it and use MPW...
  1968.  
  1969.  
  1970. Amanda Walker
  1971. InterCon Systems Corporation
  1972. -- 
  1973. "Ah, prune juice: a warrior's drink."    -- Star Trek: The Next Generation
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979. +++++++++++++++++++++++++++
  1980.  
  1981. >From philip@cs.wits.ac.za (Philip Machanick)
  1982. Date: Mon, 04 Apr 1994 15:29:40 +0200
  1983. Organization: Computer Science Dept, U of Witwatersrand
  1984.  
  1985. In article <2nbb5f$i0f@news.kth.se>, d88-jwa@mumrik.nada.kth.se (Jon Wtte)
  1986. wrote:
  1987.  
  1988. > Actually, I think you hit the bad product for Symantec.
  1989. > Symantec should be selling word processors, mail applications
  1990. > and project organization chart drawing programs, not development
  1991. > tools. They should separate out development tools into a whole
  1992. > subsidiary company, with its OWN support channels, management,
  1993. > marketing budget, ...
  1994. > That's about the only way they can believably stay at the forefront
  1995. > of the tools business.
  1996.  
  1997. It seems they did do this, only they didn't think to maintain a financial
  1998. interest in the new company - isn't a large chunk of the Metrowerks
  1999. Codewarrior project based on ex-Symantec people?
  2000. -- 
  2001. Philip Machanick                   philip@cs.wits.ac.za
  2002. Department of Computer Science, University of the Witwatersrand
  2003. 2050 Wits, South Africa
  2004. phone 27(11)716-3309  fax 27(11)339-7965
  2005.  
  2006. +++++++++++++++++++++++++++
  2007.  
  2008. >From johnmce@world.std.com (John McEnerney)
  2009. Date: Mon, 4 Apr 1994 19:56:14 GMT
  2010. Organization: The World Public Access UNIX, Brookline, MA
  2011.  
  2012. >It seems they did do this, only they didn't think to maintain a financial
  2013. >interest in the new company - isn't a large chunk of the Metrowerks
  2014. >Codewarrior project based on ex-Symantec people?
  2015.  
  2016. Actually, there are only 3 ex-Symantec employees at Metrowerks, plus Greg 
  2017. Dow who did the TCL on contract for Symantec. Metrowerks itself has quite 
  2018. a few more people than that.
  2019.  
  2020. -- John
  2021.  
  2022.  
  2023. +++++++++++++++++++++++++++
  2024.  
  2025. >From Stuart Cheshire <cheshire@cs.stanford.edu>
  2026. Date: 9 Apr 1994 16:47:29 GMT
  2027. Organization: Stanford University
  2028.  
  2029. In article <Cnr3Dr.CpL@world.std.com> John McEnerney, johnmce@world.std.com
  2030. writes:
  2031. >Actually, there are only 3 ex-Symantec employees at Metrowerks
  2032.  
  2033. Yeah, but WHICH three?
  2034.  
  2035. Stuart Cheshire <cheshire@cs.stanford.edu>
  2036.  * <A HREF="file://brubeck.stanford.edu/www/cheshire-bio.html">WWW</A>
  2037.  * Stanford Distributed Systems Group Research Assistant
  2038.  * Escondido Village Resident Computer Coordinator
  2039.  * Macintosh Programmer
  2040.  
  2041. ---------------------------
  2042.  
  2043. >From interealm@aol.com (Interealm)
  2044. Subject: System 7 Pro & Drag Mgr.
  2045. Date: 2 Apr 1994 11:53:04 -0500
  2046. Organization: America Online, Inc. (1-800-827-6364)
  2047.  
  2048. Hi...
  2049.  
  2050. Can someone tell me what version of the Finder ships with System 7 Pro and
  2051. whether or not Sys7Pro comes stock with built in Drag Manager Support from the
  2052. Finder?
  2053.  
  2054. Thanks in advance...
  2055.  
  2056. Jack
  2057.  
  2058. +++++++++++++++++++++++++++
  2059.  
  2060. >From gdl@stlawrence.maths (Greg Landweber)
  2061. Date: 04 Apr 1994 22:15:41 GMT
  2062. Organization: (none)
  2063.  
  2064. In article <2nk7tg$nvk@search01.news.aol.com> interealm@aol.com (Interealm) writes:
  2065.    Can someone tell me what version of the Finder ships with System 7 Pro and
  2066.    whether or not Sys7Pro comes stock with built in Drag Manager Support from the
  2067.    Finder?
  2068.  
  2069. System 7 Pro uses Finder 7.1.3, which supports the drag manager if the
  2070. Drag Manager is present.
  2071.  
  2072. System 7 Pro contains a limited version of the Drag Manager which is
  2073. used by Finder 7.1.3, but it cannot be used by any other application.
  2074.  
  2075. If you want other applications to support drag manager features, you
  2076. need the "Macintosh Drag and Drop" extension.
  2077.  
  2078. -- Greg "Browser" Landweber
  2079.    gdl@maths.ox.ac.uk
  2080.  
  2081. +++++++++++++++++++++++++++
  2082.  
  2083. >From ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  2084. Date: 5 Apr 94 13:00:13 +1300
  2085. Organization: University of Waikato, Hamilton, New Zealand
  2086.  
  2087. In article <2nk7tg$nvk@search01.news.aol.com>, interealm@aol.com (Interealm) writes:
  2088. >
  2089. > Can someone tell me what version of the Finder ships with System 7 Pro and
  2090. > whether or not Sys7Pro comes stock with built in Drag Manager Support from the
  2091. > Finder?
  2092.  
  2093. System 7 Pro comes with Finder 7.1.3. This is the same version that supports
  2094. the Drag Manager Clipping Extension, Finder scripting, and QuickDraw GX beta 3.
  2095. By the way, the Power Macs come with Finder 7.1.4.
  2096.  
  2097. System 7 Pro has some kind of built-in Drag Manager, but I don't think the
  2098. API for that is available to ordinary mortals--you still need to install the
  2099. Drag Manager extension to get the public API.
  2100.  
  2101. That built-in Drag Manager is interesting: it lets you drag stuff about
  2102. in Finder windows without bringing the Finder to the front--not until you let
  2103. go the mouse button.
  2104.  
  2105. Lawrence
  2106. (trying to think of an excuse for wanting that feature in my own programs :-))
  2107.  
  2108. +++++++++++++++++++++++++++
  2109.  
  2110. >From Jens Alfke <jens_alfke@powertalk.apple.com>
  2111. Date: Thu, 7 Apr 1994 00:51:21 GMT
  2112. Organization: Apple Computer
  2113.  
  2114. Lawrence D'Oliveiro, ldo@waikato.ac.nz writes:
  2115. > That built-in Drag Manager is interesting: it lets you drag stuff about
  2116. > in Finder windows without bringing the Finder to the front--not until you
  2117. let
  2118. > go the mouse button.
  2119. > Lawrence
  2120. > (trying to think of an excuse for wanting that feature in my own programs
  2121. :-))
  2122.  
  2123. This is the preferred HI for draggable apps. You want to be able to drag
  2124. something from a background window without having that window immediately
  2125. come to the front and obscure your intended destination. Finder 7.0 fixed
  2126. this for the Finder->Finder drag situation, and with the Drag Manager they've
  2127. generalized it into an HI guideline for all apps.
  2128.  
  2129. --Jens Alfke
  2130.   jens_alfke@powertalk              Rebel girl, rebel girl,
  2131.             .apple.com              Rebel girl you are the queen of my world
  2132.  
  2133. ---------------------------
  2134.  
  2135. >From mjg001@acad.drake.edu
  2136. Subject: Using PBCatSearch
  2137. Date: Tue, 5 Apr 1994 21:18:19 GMT
  2138. Organization: Drake University, Des Moines, Iowa, USA
  2139.  
  2140. I seem to be having a problem with a difference between the described
  2141. record in IM and what I actually find in the C interface libraries for the
  2142. Mac. Let me explain. I'm trying to access a field in a struct of CInfoPBRec,
  2143. I'm trying to access the ioNamePtr field in the record by using a CInfoPBPtr.
  2144. The problem is that whenever I compile the compiler says that there is no
  2145. such member in that struct. I looked in the C interface libraries for THINK
  2146. C and found that there is no ioNamePtr in the struct CInfoPBRec like
  2147. described in IM. 
  2148.  
  2149. I'm trying to search a disk using PBCatSearch() and this is where I have ended
  2150. up. If you have any code or examples for this in C then please send them
  2151. to me. Thanks for any help.
  2152.  
  2153.  
  2154.                 -Mike
  2155.  
  2156.  
  2157. +++++++++++++++++++++++++++
  2158.  
  2159. >From greer@utdallas.edu (Dale M. Greer)
  2160. Date: 5 Apr 1994 21:39:04 GMT
  2161. Organization: The University of Texas at Dallas
  2162.  
  2163. mjg001@acad.drake.edu wrote:
  2164. > I seem to be having a problem with a difference between the described
  2165. > record in IM and what I actually find in the C interface libraries for the
  2166. > Mac. Let me explain. I'm trying to access a field in a struct of CInfoPBRec,
  2167. > I'm trying to access the ioNamePtr field in the record by using a CInfoPBPtr.
  2168. > The problem is that whenever I compile the compiler says that there is no
  2169. > such member in that struct. I looked in the C interface libraries for THINK
  2170. > C and found that there is no ioNamePtr in the struct CInfoPBRec like
  2171. > described in IM. 
  2172.  
  2173. > I'm trying to search a disk using PBCatSearch() and this is where I have ended
  2174. > up. If you have any code or examples for this in C then please send them
  2175. > to me. Thanks for any help.
  2176.  
  2177. I found an example of using PBCatSearch at ftp.apple.com.  It looks
  2178. for a file by Type and Creator.  Once it finds the file, the name
  2179. is in csBlockPtr->ioMatchPtr[0].name.  Before searching, the field
  2180. csBlockPtr->ioSearchInfo1->hFileInfo.ioNamePtr is set to nil.  The
  2181. structure csBlockPtr is a CSParamPtr.  CInfoPBPtr begins with an
  2182. HFileInfo, which in turn begins with a ParamBlockHeader which
  2183. also contains an ioNamePtr.
  2184.  
  2185. I can send you the DTS PBCatSearch example or post it if you don't have 
  2186. access to ftp.apple.com.
  2187.  
  2188. --
  2189.  
  2190. Dale Greer, greer@utdallas.edu
  2191.  
  2192.  
  2193.  
  2194. +++++++++++++++++++++++++++
  2195.  
  2196. >From allon@intercon.com (Allon Stern)
  2197. Date: Tue,  5 Apr 1994 23:51:31 -0400
  2198. Organization: InterCon Systems Corporation, Herndon VA.
  2199.  
  2200. In article <2nslpo$fga@news.utdallas.edu>, greer@utdallas.edu (Dale M. Greer) 
  2201. writes:
  2202. > mjg001@acad.drake.edu wrote: 
  2203. > > I'm trying to search a disk using PBCatSearch() and this is where I 
  2204. > > have ended up. If you have any code or examples for this in C then 
  2205. > > please send them to me. Thanks for any help. 
  2206. > I found an example of using PBCatSearch at ftp.apple.com.  It looks for 
  2207. > a file by Type and Creator.  Once it finds the file, the name 
  2208. > is in csBlockPtr->ioMatchPtr[0].name.  Before searching, the field 
  2209. > csBlockPtr->ioSearchInfo1->hFileInfo.ioNamePtr is set to nil.  The 
  2210. > structure csBlockPtr is a CSParamPtr.  CInfoPBPtr begins with an 
  2211. > HFileInfo, which in turn begins with a ParamBlockHeader which 
  2212. > also contains an ioNamePtr. 
  2213.  
  2214. When writing your code, keep in mind that not all volumes support PBCatSearch.
  2215. The proper way to check to see if it is supported is to call PBHGetVolParams
  2216. and check the appropriate bit (bHasCatSearch = 7).
  2217.  
  2218. Reference: IM-Files pages 2-147 through 2-150
  2219.  
  2220.  
  2221. Also, on page 2-205 of IM-Files, it states:
  2222. "Not all volumes support the PBCatSearch function [...] even though AFP
  2223. volumes support PBCatSearch, they do not support all of its features that are
  2224. available on local volumes."
  2225.  
  2226. In other words, your mileage may vary 8^)
  2227.  
  2228. --
  2229. Allon
  2230.  
  2231.  
  2232. | Allon Stern        | 703-709-5557 |  Ring around the Internet    |
  2233. | allon@intercon.com |    KE4FYL    |  A packet with a bit not set |
  2234. +--------------------+--------------+  ENQ ACK ENQ ACK             |
  2235. |  All opinions above are my own.   |  We all go down!             |
  2236. |------------------------------------------------------------------|
  2237.  
  2238.  
  2239.  
  2240. +++++++++++++++++++++++++++
  2241.  
  2242. >From blob@apple.com (Brian Bechtel)
  2243. Date: 9 Apr 1994 17:48:49 -0700
  2244. Organization: Apple Computer, Inc., Cupertino, California
  2245.  
  2246. mjg001@acad.drake.edu writes:
  2247.  
  2248. >I'm trying to search a disk using PBCatSearch() and this is where I have ended
  2249. >up. If you have any code or examples for this in C then please send them
  2250. >to me. Thanks for any help.
  2251.  
  2252. ftp://ftp.apple.com/dts/mac/sc/morefiles.1.1.1.hqx
  2253.  
  2254. contains excellent sample code for using PBCatSearch, among other
  2255. functions.
  2256.  
  2257. --Brian Bechtel     blob@apple.com     "My opinion, not Apple's"
  2258.  
  2259. ---------------------------
  2260.  
  2261. End of C.S.M.P. Digest
  2262. **********************
  2263.  
  2264.  
  2265.  
  2266.